Finding Out About Image Formats
These functions return information about the image format supported by a graphics exporter. Format-specific exporters must implement all three of these calls.
GraphicsExportGetDefaultFileTypeAndCreator
Returns the suggested file type and creator.
pascal ComponentResult GraphicsExportGetDefaultFileTypeAndCreator (GraphicsExportComponent ci,
OSType *fileType,
OSType *fileCreator);
-
ci
-
Specifies the component instance that identifies your connection to the graphics exporter component.
-
fileType
-
Points to a location to receive the suggested file type for the image file format. If you do not need this information, pass
nil
.
-
fileCreator
-
Points to a location to receive the suggested file creator for the new image file format. If you do not need this information, pass
nil
.
GraphicsExportGetDefaultFileNameExtension
Returns the suggested file name extension.
pascal ComponentResult GraphicsExportGetDefaultFileNameExtension ( GraphicsExportComponent ci,
OSType *fileNameExtension);
-
ci
-
Specifies the component instance that identifies your connection to the graphics exporter component.
-
fileNameExtension
-
-
Points to a location to receive the file name extension.
DISCUSSION
File name extensions are returned as upper-case big-endian four-character-codes. For example, the extension "
.png
" would be returned as
'PNG'
(0x504E4720).
GraphicsExportGetMIMETypeList
Returns MIME types and other information about the graphics format.
pascal ComponentResult GraphicsExportGetMIMETypeList (GraphicsExportComponent ci,
void *qtAtomContainerPtr);
-
ci
-
Specifies the component instance that identifies your connection to the graphics exporter component.
-
qtAtomContainerPtr
-
-
Receives a newly-created QuickTime atom container that contains information about the graphics format.
DISCUSSION
This function creates and returns a QuickTime atom container that contains the following information about the graphics format:
-
The format's name, as a string in an atom of type
kMimeInfoDescriptionTag
.
-
Optionally, the MIME type, as a string in an atom of type
kMimeInfoMimeTypeTag
.
RESULT CODES
noErr
|
0
|
No error
|
paramErr
|
-50
|
Invalid parameter specified
|
memFullErr
|
-108
|
Not enough memory available
|
© 1999 Apple Computer, Inc.| Previous | Chapter Contents | Chapter Top | Next |